<template>
  <div class="code-pre" v-highlight>
    <pre>
      <code>{{props.code}}</code>
    </pre>
  </div>
</template>

<script setup lang="ts">
const props = defineProps({
  code: String,
})
</script>

<style scoped lang="less">
.code-pre {
  pre {
    line-height: 0;
    code {
      font-size: 13px;
      line-height: 1.4;
      border-radius: 8px;
      max-height: 300px;
      overflow-x: hidden;
      &::-webkit-scrollbar {
        display: none;
      }
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
  }
}
</style>
